package 补充.String;

public class StringBuffer常用方法 {

    public static void main(String[] args) {
        //类名不要和关键字相同
        StringBuffer sb1 =new StringBuffer();
        sb1.append("Hello");
        sb1.append("!");
        StringBuffer sb2 =new StringBuffer();
        sb2.append("word");
        sb2.append(sb2);
        sb1.delete(5,6);
        String s="___";
        sb1.insert(5,s);
        System.out.println(sb1);
        System.out.println(sb1.reverse());


    }

}
